//
// Created by cube on 2020/8/22.
//
//
//#include "../Base/Object.h"
//#include <iostream>
//
//
//class MyHandler : public EventLoop::EventHandler{
//public:
//    bool filter(EventAgent& event) override {
//        return EventLoop::EventHandler::filter(event);
//    }
//    void event(EventAgent& event) override {
//        std::cout<<"event" <<event->getType()<<std::endl;
//        if(event->getType() == DEvent<int>::type()){
//            event.reSend();
//        }
//    }
//};
//
//class MyObject : public Object{
//public:
//    LIB_OBJECT
//    LIB_SIGNAL_OBJ(signal_a,int)
//    LIB_SIGNAL_OBJ(signal_b,int)
//public:
//    void emit_ff(int a){
//        emit(signal_a,a);
//    }
//
//protected:
//    bool filter(EventAgent& event) override {
////        std::cout<<"filter "<<event->getType()<<std::endl;
//        return Object::filter(event);
//    }
//    void event(EventAgent& event) override {
////        std::cout<<"event "<<event->getType()<<std::endl;
//        Object::event(event);
//    }
//
//};
//
//
//int main(int argc, char *argv[])
//{
//    std::cout<<"start"<<std::endl;
//
//
//
//    std::cout<<"end"<<std::endl;
//
//    return 0;
//}
//
//
//
////
////
////template <typename T>
////class Aspect{
////public:
////    Aspect(T* obj):__obj(obj){
////
////    }
////    virtual ~Aspect(){
////
////    }
////
////    T* operator->(){return __obj;}
////private:
////    T* __obj;
////};
////
////struct OBj{
////    void fun(){
////        std::cout<<"aaa"<<std::endl;
////    }
////};
////
////
////template <typename T>
////class MyAspect : public Aspect<T>{
////public:
////    MyAspect(T* obj):Aspect<T>(obj){
////        std::cout<<"myaspect start"<<std::endl;
////    }
////    ~ MyAspect(){
////        std::cout<<"myaspect end"<<std::endl;
////    }
////};
////
////
////int main(int argc, char *argv[])
////{
////    std::cout<<"start"<<std::endl;
////
////    OBj obj;
////    MyAspect<OBj>(&obj)->fun();
////
////    std::cout<<"end"<<std::endl;
////    return 0;
////}